package com.jic.point.controller.feign;

import com.jic.point.api.UserPointApi;
import com.jic.point.service.PublMemberBalanceService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;


@RequestMapping("/api/point/userPoint")
@RestController
public class UserPointApiOpenFeign implements UserPointApi {

    @Resource
    private PublMemberBalanceService service;
    /**
     * @param id
     * @description: 根据用户id获取用户的积分
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 13:11
     */
    @Override
    public BigDecimal queryUserPointById(Long id) {
        BigDecimal point = service.getUserPoint(id);
        return point;
    }
}
